/*
 * RpcClient.h
 *
 *  Created on: Nov 4, 2015
 *      Author: rpi
 */

#ifndef RPCCLIENT_H_
#define RPCCLIENT_H_

#include <json/json.h>
#include <jsonrpc.h>
#include <string>

class RpcClient {
public:
	RpcClient(std::string stdIpAddr, unsigned short usPort);
	virtual ~RpcClient();
	void initialize();
	void finalize();
	bool request(std::string stdCmd, Json::Value &joResp);
	bool request(std::string stdCmd, Json::Value &joParam, Json::Value &joResp);

private:
	Json::Rpc::TcpClient _tcpClient;
	int _iSequence;
};

#endif /* RPCCLIENT_H_ */
